//
//  TogetherMasterViewController.m
//  Together_iOS
//
//  Created by QIU Shuang on 2/28/14.
//  Copyright (c) 2014 QIU Shuang. All rights reserved.
//

#import "TogetherMasterViewController.h"
#import "TogetherDetailViewController.h"
#import "TogetherDateArrangerViewController.h"

@interface TogetherMasterViewController ()

@end

@implementation TogetherMasterViewController

- (void)awakeFromNib
{
    [super awakeFromNib];
}


- (void)loadView {
    [super loadView];
    UIButton *tmpButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    [tmpButton addTarget:self action:@selector(tmp:) forControlEvents:UIControlEventTouchUpInside];
    tmpButton.frame = CGRectMake(100.0f, 100.0f, 100.0f, 80.0f);
    [tmpButton setTitle:@"click me" forState:UIControlStateNormal];
    [tmpButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    tmpButton.titleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
    [self.view addSubview:tmpButton];

}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
    self.navigationItem.leftBarButtonItem = self.editButtonItem;

//    UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:@selector(insertNewObject:)];
//    self.navigationItem.rightBarButtonItem = addButton;
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)tmp:(id)sender {
    TogetherDateArrangerViewController *dateArranger = [[TogetherDateArrangerViewController alloc] init];
    [self.navigationController pushViewController:dateArranger animated:YES];
}

@end
